package com.cgsrp.cgsrp_community.service;

import com.cgsrp.cgsrp_community.domain.Blog;
import com.cgsrp.utils.Result;
import com.github.pagehelper.PageInfo;
import org.springframework.web.multipart.MultipartFile;

public interface BlogService{


    int deleteByPrimaryKey(Integer id);

    int insert(Blog record);

    int insertSelective(Blog record);

    Blog selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Blog record);

    int updateByPrimaryKey(Blog record);

    PageInfo<Blog> tlist( Integer curPage, Integer pageSize,String searchKey);

    PageInfo<Blog> glist(int userId, Integer curPage, Integer pageSize,String searchKey);

    void increaseLevelByLike(Integer blogId);

    void reduceLevelByLike(Integer blogId);

    Result getBlogByUserId(int userId, Integer curPage, Integer pageSize, String searchKey);

    Result uploadFile(MultipartFile photo);
}
